/**
 * Company : SIANGKLOM.
 * Created By : Chatree Siangklom
 * Created On : Aug 28, 2013  3:46:24 PM 
 * e-Mail : dr_chatree@hotmail.com
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : com.tis.database.services.security.impl
 * File Name : AdUserGroupServicesImpl.java
 * TODO
 */
package com.tis.database.services.security.impl;

import java.util.List;

import org.hibernate.HibernateException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tis.database.dao.security.AdUserGroupDao;
import com.tis.database.entitys.security.AdActiveDirectory;
import com.tis.database.entitys.security.AdUserGroup;
import com.tis.database.services.security.IAdUserGroupServices;

/**
 * @author Administrator
 *
 */
@Service
@Transactional(readOnly = true)
public class AdUserGroupServicesImpl implements IAdUserGroupServices {
	
	private static final Logger log = LoggerFactory.getLogger(AdUserGroupServicesImpl.class);

	@Autowired
	private AdUserGroupDao adUserGroupDao; 
	
	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IAdUserGroupServices#findByAdActiveDirectory(com.tis.database.entitys.security.AdActiveDirectory)
	 */
	@Override
	public List<AdUserGroup> findByAdActiveDirectory(AdActiveDirectory adActiveDirectory)  throws HibernateException{
		
		return adUserGroupDao.findByAdActiveDirectory(adActiveDirectory);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IAdUserGroupServices#findByCode(java.lang.String)
	 */
	@Override
	public List<AdUserGroup> findByCode(String code) throws HibernateException{
		
		return adUserGroupDao.findByCode(code);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IAdUserGroupServices#findByName(java.lang.String)
	 */
	@Override
	public List<AdUserGroup> findByName(String name) throws HibernateException{
		
		return adUserGroupDao.findByName(name);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IAdUserGroupServices#findByDescription(java.lang.String)
	 */
	@Override
	public List<AdUserGroup> findByDescription(String description) throws HibernateException{
		
		return adUserGroupDao.findByDescription(description);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IAdUserGroupServices#findByIsActive(java.lang.String)
	 */
	@Override
	public List<AdUserGroup> findByIsActive(String isactive) throws HibernateException{
		
		return adUserGroupDao.findByIsActive(isactive);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IAdUserGroupServices#findByIsDelete(java.lang.String)
	 */
	@Override
	public List<AdUserGroup> findByIsDelete(String isdeleted) throws HibernateException{
		
		return adUserGroupDao.findByIsDelete(isdeleted);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IAdUserGroupServices#findByStatus(java.lang.String)
	 */
	@Override
	public List<AdUserGroup> findByStatus(String status) throws HibernateException{
		
		return adUserGroupDao.findByStatus(status);
	}

}
